<template>
	<view class="home_card">
		<p class="title" v-if="item.title">{{item.title}}
			<slot name="head"></slot>
		</p>
		<view class="filecard" :style="{background:color}" style="">
			<view :style="{width:value.width}" v-for="value in item.child" style="display: flex;margin-top: 20rpx;">
				<view style=" margin-right: 30rpx;" class="titlesize">{{value.title}}</view>
				<view v-if='value.mark != "file"'>{{value.mark || ''}} 
					<text v-if="value.title.indexOf('桶') != -1">桶</text>
					<text v-if="value.title.indexOf('重') != -1">kg</text>
					<!-- <text v-if="value.title.indexOf('桶') != -1">桶</text> -->
				</view>
				<view v-if='value.mark == "file"'>
					<slot name="markedict"></slot>
				</view>
			</view>
		</view>
		<slot></slot>
	</view>
</template>
<script>
	export default {
		props: {
			title: {
				type: String,
				default: '111111111'
			},
			color: {
				type: String,
				default: '#FFF'
			},
			item: {
				type: Object,
				default: {}
			}
		},
		data() {
			return {
				name: '哈哈哈',
				time: '2023',
				short: '张三',
				address: '武侯区'
			};
		}
	}
</script>

<style lang="less" scoped>
	.home_card {
		width: 750rpx;
		background: #FFFFFF;
		box-sizing: border-box;
		padding: 0rpx 20rpx 30rpx;
		margin-bottom: 20rpx;
	}

	.filecard {
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		border-radius: 10rpx;
		margin-top: 10rpx;
		padding: 20rpx;
		font-size: 30rpx;
		padding-top: 0;
		overflow: hidden;

		.titlesize {
			font-family: PingFang SC, PingFang SC-Regular;
			font-weight: Regular;
			text-align: left;
			color: #999999;
			position: relative;
		}

		p {
			font-size: 36rpx;
			font-family: PingFang SC, PingFang SC-Regular;
			font-weight: Regular;
			text-align: left;
			color: #333333;

		}
	}

	.filecard p:last-child {
		margin-bottom: 0rpx !important;
	}

	.title {
		font-size: 34rpx;
		font-family: PingFang SC, PingFang SC-Semibold;
		font-weight: bold;
		text-align: left;
		color: #333333;
		// line-height: 98rpx;
		display: flex;
		height: 98rpx;
		align-items: center;
	}
</style>